/*
 * manejadorDeArboles.h
 *
 *  Created on: 02/06/2010
 *      Author: Usuario
 */

#ifndef MANEJADORDEARBOLES_H_
#define MANEJADORDEARBOLES_H_
#include "ArbolHuffman.h"
#include "BitHandlerOutput.h"
#include "BitHandlerInput.h"

class manejadorDeArboles {
private:
  ArbolHuffman arboles[256];
  ArbolHuffman longitudes;
  BitHandlerInput *bhi;
  BitHandlerOutput *bho;
  unsigned int ultimoCaracter;
  void emitir8bits(unsigned int c);
public:
	manejadorDeArboles();
	virtual ~manejadorDeArboles();
	void setBitHandlerInput(BitHandlerInput& bithi);
	void setBitHandlerOutput(BitHandlerOutput&bitho);
	void emitirCaracter(unsigned int c);
	void emitirLongitud(unsigned int c);
	unsigned int obtenerCaracter();
	unsigned int obtenerLongitud();
	unsigned int leer8bits();
	void emitirEof();
};

#endif /* MANEJADORDEARBOLES_H_ */
